﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.DirectoryServices;
using DocumentManagement.Models;
using DocumentManagement.ViewsModels;


namespace DocumentManagement.Views
{
    /// <summary>
    /// Interaction logic for LoginWindow.xaml
    /// </summary>
    public partial class LoginWindow : Window
    {
        LoginWindowViewsModel _loginWindowViewsModel;
        public LoginWindow()
        {
            InitializeComponent();
            _loginWindowViewsModel = this.Resources["loginWindowViewsModel"] as LoginWindowViewsModel;
        }
      
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            _loginWindowViewsModel.CheckUser();
            HomeWindow homeWin = new HomeWindow();
            homeWin.Show();
            this.Close();

        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            UserNameTextBox.Focus();
           
        }
       
      

      
    }
}
